from django.db import models


# Create your models here.

class GoodsCategory(models.Model):
    name = models.CharField(max_length=31)


class GoodsCategoryBrand(models.Model):
    category = models.ForeignKey(GoodsCategory, on_delete=models.CASCADE, related_name='brands',
                                 null=True, blank=True,
                                 )
    name = models.CharField(max_length=12)


class Good(models.Model):
    category = models.ForeignKey(GoodsCategory,
                                 on_delete=models.CASCADE)

    name = models.CharField(max_length=12)
